package com.hxkj.dao.impl;

import com.hxkj.dao.LogDao;
import com.hxkj.mapper.LogMapper;
import com.hxkj.domain.po.Log;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;


/**
* 数据操作实现
*
* @author: chenwei
* @version: 1.0
* @datetime: 2018-09-09 15:34:03
*
*/
@Service("logDao")
public class LogDaoImpl implements LogDao {

    @Resource
    private LogMapper logMapper;

    @Override
    public Log get(Long logId) {
        return logMapper.selectByPrimaryKey(logId);
    }

    @Override
    public List<Log> get(Log log) {
        return logMapper.select(log);
    }

    @Override
    public int delete(Long logId) {
        return logMapper.deleteByPrimaryKey(logId);
    }

    @Override
    public int delete(Log log) {
        return logMapper.delete(log);
    }

    @Override
    public int save(Log log) {
        return logMapper.insert(log);
    }

    @Override
    public int update(Log log) {
        return logMapper.update(log);
    }
}
